package br.com.abril.booking;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface BookingRepository 
				extends JpaRepository<Booking, Long>
					  , JpaSpecificationExecutor<Booking> {
	
	@Modifying
	@Query("update Booking u set u.status = ?1 where u.wallet = ?2")
	int setProcessingStatusByWallet(String status, String wallet);

}

